Skip to content

Conversation

apatard
Copy link
Contributor

@apatard apatard commented Sep 28, 2020

It's possible to specify a pathspec (eg :!foo) to git diff/status/...
but it currently fails with:

git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128)
cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo
stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree.

Add missing '--' to the arguments to fix this ambiguity

Fixes: #1061
Signed-off-by: Arnaud Patard [email protected]

It's possible to specify a pathspec (eg :!foo) to git diff/status/...
but it currently fails with:

git.exc.GitCommandError: Cmd('/usr/bin/git') failed due to: exit code(128)
  cmdline: /usr/bin/git diff --abbrev=40 --full-index --raw :!foo
  stderr: 'fatal: ambiguous argument ':!foo': unknown revision or path not in the working tree.

Add missing '--' to the arguments to fix this ambiguity

Signed-off-by: Arnaud Patard <[email protected]>
@Byron Byron added this to the v3.1.9 - Bugfixes milestone Sep 28, 2020
@Byron Byron merged commit 624eb28 into gitpython-developers:master Sep 28, 2020
@Byron
Copy link
Member

Byron commented Sep 28, 2020

Thanks a lot for your contribution, especially for the exhaustive test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

repo.is_dirty() is not working with a pathspec
2 participants